package com.zpark.controller;

import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

//@Controller
//@RequestMapping("/error")
public class BaseErrorController implements ErrorController {
    @Override
    public String getErrorPath() {
        System.out.println("出错了，进入自定义错误控制器...");
        return "error/error";
    }
    @RequestMapping
    public String error(){
        return getErrorPath();
    }
}
